Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifiy number of filter is cosine filterbank #72

Merged
merged 5 commits into from
Dec 18, 2023

Conversation

OleBialas
Copy link
Contributor

I've added an n_filters argument to slab.Filter.cos_filterbank and slab.Filter.center_freqs so that one can directly specify the desired number of filters (bandwidth argument is ignored in that case).

The concrete use case is that I wanted to create a 16-band spectrogram of a given signal, and realized that there was no straight forward way of doing this in slab.

I also updated the docstring and the test function of test_center_freqs to make sure that specifying bandwidth and number of filter produces the same results

@OleBialas
Copy link
Contributor Author

To be consistent, I added the same argument to Sound.cochleagram but called it n_bands since I found that more descriptive in this case. Also fixed the y-axis labeling

@DrMarc DrMarc merged commit 4dfb6ed into DrMarc:master Dec 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants